package com.esri.core.internal.tasks.ags;

import com.esri.core.internal.tasks.TaskListener;
import com.esri.core.io.UserCredentials;
import java.util.ArrayList;
import org.codehaus.jackson.JsonParser;
import org.codehaus.jackson.JsonToken;

/* loaded from: classes.dex */
public class z extends com.esri.core.internal.tasks.d<ak> {
    private static final long serialVersionUID = 1;

    public z(al alVar, String str, String str2, UserCredentials userCredentials) {
        this(alVar, str, str2, userCredentials, null);
    }

    public z(al alVar, String str, String str2, UserCredentials userCredentials, TaskListener<ak> taskListener) {
        super(alVar, str + "/community/groups/" + str2 + "/users", userCredentials, taskListener);
    }

    @Override // com.esri.core.internal.tasks.a
    /* renamed from: a */
    public ak execute() throws Exception {
        ArrayList arrayList = new ArrayList();
        ArrayList arrayList2 = new ArrayList();
        JsonParser a = com.esri.core.internal.io.handler.h.a(this.serviceURL, getActionInput().generateRequestParams(), getServiceCredentials());
        if (com.esri.core.internal.util.d.c(a)) {
            while (a.nextToken() != JsonToken.END_OBJECT) {
                String currentName = a.getCurrentName();
                a.nextToken();
                if (currentName.equals("users")) {
                    while (a.nextToken() != JsonToken.END_ARRAY) {
                        arrayList2.add(a.getText());
                    }
                } else if (currentName.equals("admins")) {
                    while (a.nextToken() != JsonToken.END_ARRAY) {
                        arrayList.add(a.getText());
                    }
                } else {
                    a.skipChildren();
                }
            }
        }
        return new ak(arrayList, arrayList2);
    }
}
